/**   
* @Description: 所有controller的抽象父类 
*/ 
package org.kskj.ipw.controller;

import org.kskj.ipw.entity.ResponseEntity;

/** 
* @author sztan 
* @date 2016年8月1日 上午8:54:43 
* @version 1.0 
*/
public abstract class BaseController {
	
	private ResponseEntity responseEntity;

	public ResponseEntity getResponseEntity() {
		return responseEntity;
	}

	public void setResponseEntity(ResponseEntity responseEntity) {
		this.responseEntity = responseEntity;
	}
	
	public ResponseEntity success(Object data, String message) {
		return new ResponseEntity(data, message);
	}
	
	public ResponseEntity success(Object data) {
		return new ResponseEntity(data);
	}
	
	public ResponseEntity error(String message) {
		return new ResponseEntity(message);
	}
	
	public ResponseEntity error(Object data, String message) {
		return new ResponseEntity(data);
	}
}
 